@import url("public.css");

$main-color: rgb(2, 189, 158);
$wg-h: 26px;
$bg-bg: rgb(32, 39, 65);
$wg-bor-r: 5px;
$wg-bor: 2px solid rgba(101, 119, 179, 0.336);

%center {
  display: flex;
  align-items: center;
  justify-content: center;
}
%ease-0 {
  transition: all 0.1s ease;
}
%ease-1 {
  transition: all 0.2s ease;
}
%ease-2 {
  transition: all 0.3s ease;
}

:root {
  --ed-wg-main-color: #{$main-color};
  --editTop: 60px;
  --pad: 6px;
  --iconScale: 1.24;
  --item_h: 42px;
}
body {
  margin: 0;
  padding: 0;
  color: white;
  height: 100%;
  width: 100%;
  position: absolute;
  box-sizing: border-box;
  background-color: var(--edit-area-bg);
  overflow: hidden;
}

.wrapper {
  position: absolute;
  height: 100%;
  width: 100%;
}
#editTop {
  height: var(--editTop);
  display: block;
  background-image: var(--edit-top_grad_allied);
  .icon {
    height: var(--editTop);
    width: calc(var(--editTop) * 1.3);
  }
}
#itemBox {
  width: 400px;
  height: var(--editTop);
  display: flex;
  left: 10px;
  top: -20px;
}

#noIcon {
  font-size: 30px;
  text-align: center;
  width: 100%;
  color: rgba(255, 255, 255, 0.5);
}
#itemName {
  height: 50px;
  width: 300px;
  margin-top: 6px;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
#bgText {
  overflow: hidden;
  color: white;
  height: var(--editTop);
  width: calc(100% - var(--pad) * 2);
  position: absolute;
  display: flex;
  justify-content: right;
  line-height: 64px;
  font-size: 70px;
  letter-spacing: 4px;
  font-style: italic;
  user-select: none;
  opacity: 0.15;
}
#bgText::after {
  font-size: 20px;
  content: " ";
  white-space: pre;
}

#floatInfo {
  position: absolute;
  display: flex;
}

#itemName #n1 {
  font-size: 20px;
}
#itemName #n2 {
  margin-top: 2px;
  font-size: 12px;
  color: rgb(185, 185, 185);
}

#itemIcon {
  box-sizing: border-box;
  border: 2px solid var(--hover_color_2);
  height: var(--editTop);
  width: calc(var(--editTop) * 1.3);
  position: absolute;
  background-image: url("../img/iconTile.jpg");
  background-repeat: no-repeat;
  background-size: calc(600px * var(--iconScale));
  background-position: calc(60px * var(--iconScale))
    calc(48px * var(--iconScale));
}
.item-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}
@keyframes pinWiggle {
  0% {
    transform: rotate(40deg);
  }
  20% {
    transform: rotate(40deg);
  }
  50% {
    transform: rotate(60deg);
  }
  80% {
    transform: rotate(30deg);
  }
  100% {
    transform: trotate(40deg);
  }
}
#fixBtn {
  -webkit-appearance: none;
  position: absolute;
  width: 70px;
  height: 54px;
  &::after {
    position: absolute;
    font-family: "FontAwesome";
    font-size: 30px;
    content: "\f276";
    color: rgb(2, 189, 158);
    transform: rotate(40deg);
    opacity: 0;
    transform-origin: 10px 30px;
    transition: 0.1s ease;
    right: -40px;
    bottom: 40px;
    // text-shadow: 0px 0px 10px white;
    -webkit-text-stroke: 0.04em rgba(255, 255, 255, 0.781);
  }
  &:hover::after {
    opacity: 1;
    right: -20px;
    bottom: 20px;
  }

  &:checked::after {
    opacity: 1;
    right: 2px;
    bottom: 6px;
    animation-delay: 2s;
    animation: pinWiggle 0.35s;
  }
}

#editBottom {
  flex: 1;
  height: calc(100% - var(--editTop));
  top: calc(var(--editTop) + var(--pad));
  width: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
}
#editBottom #editList {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.edit-op-va {
  position: relative;
  color: var(--edit-font-color);
  width: 100%;
  height: var(--item_h);
  font-size: 12px;
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
  border-bottom: 1px solid var(--edit-item-line-color);
  transition: 0.06s ease;

  &:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.02);
  }

  &:hover {
    background-color: var(--edit-op-va_bg);
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.3);
  }
  .wrapper div {
    box-sizing: border-box;
  }
}

.edit-item-changed {
  &::after {
    position: absolute;
    font-size: 12px;
    color: var(--light_color);
    content: "已修改";
    left: calc(40% + 240px);
    display: flex;
    top: 30%;
  }
}

.edit-animation-in {
  opacity: 0;
}
.edit-animation-in:nth-child(even) {
  padding-right: 50%;
}
.edit-animation-in:nth-child(odd) {
  padding-left: 50%;
}
.edit-animation-out {
  transition: 0.4s ease;
  padding: 0%;
  opacity: 1;
  animation-delay: 0.2s;
  animation: edit_out 0.4s;
}
@keyframes edit_out {
  0% {
    transform: scale(1.4);
  }
  30% {
    transform: scale(0.6);
  }
  100% {
    transform: scale(1);
  }
}

.edit-value {
  height: 100%;
  right: 0;
  font-size: 16px;
  color: var(--edit-font-color);
  display: flex;
  align-items: center;
  width: 60%;
  padding-left: 6px;
  border: none;
  border-left: 1px solid var(--edit-item-line-color);
  outline: none;
  background: none;
  box-sizing: border-box;
  transition: 0.08s ease-in;
  white-space: nowrap;
  &:focus {
    color: var(--light_color);
  }
}

.edit-option {
  padding-right: 6px;
  height: var(--item_h);
  width: 40%;
  background: none;
  transition: 0.08s ease-in;
  white-space: nowrap;
  position: relative;
  div {
    pointer-events: none;
    text-align: right;
    position: absolute;
    right: 6px;
  }
  .a {
    top: 2px;
    font-size: 15px;
  }
  .b {
    top: 21px;
    font-size: 12px;
    opacity: 0.4;
  }
}
#floatInfo .icon:hover .edit-tipBox {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}
#floatInfo .edit-tipBox {
  position: relative;
  width: 0%;
  height: 0%;
  pointer-events: none;
  opacity: 0;
  .edit-tooltip {
    $tip-bg: rgb(45, 45, 45);
    position: absolute;
    width: 100px;
    height: 14px;
    background-color: #{$tip-bg};
    color: rgb(255, 255, 255);
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    z-index: 1;
    top: 40px;
    left: -70px;
    font-size: 14px;
    word-break: break-word;
    white-space: pre-line;
    line-height: 14px;
    &::after {
      content: "";
      width: 0px;
      height: 0px;
      position: absolute;
      left: 25%;
      top: -40%;
      border-width: 8px;
      border-style: solid;
      border-color: transparent transparent #{$tip-bg} transparent;
    }
  }
}

.copyBtn {
  -webkit-appearance: none;
  $w: $wg-h * 1.2;
  top: 12%;
  left: 4px;
  position: absolute;
  width: #{$w};
  height: #{$w};
  color: white;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: #{$wg-bor-r};
  cursor: pointer;
  white-space: nowrap;
  @extend %ease-0;
  border: #{$wg-bor};
  // pointer-events: none;
  // opacity: 1;
  &:hover {
    background-color: var(--ed-wg-main-color);
  }
  &:active {
    background-color: #{$bg-bg};
  }
  &:hover::before {
    opacity: 1;
  }
  &:hover::after {
    color: white;
  }
  &::before {
    opacity: 0;
    height: 100%;
    width: 50%;
    color: rgba(255, 255, 255, 0.6);
    content: "复制到左边";
    position: absolute;
    left: #{$w * 1.2};
    @extend %ease-0;
  }
  &::after {
    color: rgba(255, 255, 255, 0.386);
    font-family: "FontAwesome";
    white-space: pre;
    font-size: 16px;
    @extend %center;
    content: "\f112";
    @extend %ease-0;
  }
}
.copyBtn-show {
  pointer-events: all;
  opacity: 1;
}
